<script>
	import { initService, destroyService } from '@/uni_modules/oneoil-fuiou-pay'
	export default {
		onLaunch() {
			
			uni.onTabBarMidButtonTap(function(e) {
				uni.navigateTo({
					url: '/pages/push/push',
					animationType: 'slide-in-bottom'
				});
			})
			uni.getSystemInfo({
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif
				}
			});



			if (this.$store.state.vuex_token) {
				uni.api.getUserInfo().then(res => {
					if (res.code === '200') {
						// this.$u.vuex('vuex_token', '');
						// this.$u.vuex('company_no', '');
						uni.$u.vuex('login_name', res.data.loginName);
					}
				})

			} else {
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/login/login'
					});
				}, 500);
			}

			// 设置底部导航栏角标
			// uni.setTabBarBadge({
			//   index: 0,
			//   text: ''
			// });
			// uni.removeTabBarBadge({
			//   index: 0
			// });
			// initService()
		},
		onExit() {
			destroyService()
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uni_modules/uview-ui/index.scss";
	.page_body {
		display: flex;
		font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
		flex: 1;
		width: 750upx;
		flex-direction: column;
		overflow: hidden;
	}

	.white_bg {
		background-color: #FFFFFF;
	}

	.grey_bg {
		background-color: #efefef;
	}

	.page_bg {
		background-color: #FFFFFF;
	}

	.page_grad {
		background-color: #F7F7F7;
	}

	.flex-row {
		flex-direction: row !important;
		align-items: center;
	}

	.flex {
		flex: 1;
	}

	.page_pad {
		padding: 10px;
	}

	.page_pad_leftright {
		padding: 0 10px;
	}

	.page_pad_topbottom {
		padding: 10px 0;
	}

	.vip_nick {
		color: #ff0000;
	}

	.user_nick {
		font-size: 15px;
		font-weight: 500;
	}

	.vip_img {
		width: 18px;
		height: 16px;
		/* #ifndef APP-NVUE */
		margin: auto 2px;
		vertical-align: middle;
		/* #endif */
		align-items: center;
		margin-left: 2px;
		margin-right: 2px;
	}

	.official_img {
		width: 18px;
		height: 18px;
		/* #ifndef APP-NVUE */
		margin: auto 2px;
		vertical-align: middle;
		/* #endif */
		align-items: center;
		margin-left: 2px;
		margin-right: 2px;
	}

	.none_nick {
		color: #666666;
	}

	.official_txt {
		color: #2C70FF;
	}

	.list_box {
		flex: 1;
		flex-direction: column;
	}

	/**********自定义head************/

	.jh_nav_head_fixed {
		position: fixed;
		left: 0;
		right: 0;
		top: 0;
	}

	.jh_nav_head {
		flex-direction: row;
		background-color: #FFFFFF;
		height: 65px;
	}

	.jh_nav_head_transparent {
		flex-direction: row;
		height: 65px;
	}

	.jh_nav_box {
		flex: 1;
		flex-direction: row;
		margin-top: 20px;
	}

	.jh_nav_left {
		width: 20px;
		height: 20px;
		margin-left: 10px;
		margin-top: 12px;
		margin-right: 10px;
	}

	.jh_nav_center {
		flex: 1;
		flex-direction: column;
	}

	.jh_nav_title_box {
		flex: 1;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.jh_nav_title_txt {
		font-size: 17px;
		font-weight: bold;
		color: #444444;
		text-align: center;
		justify-content: center;
	}

	.jh_nav_title {
		flex: 1;
		flex-direction: row;
		align-items: center;
	}

	.jh_nav_right {
		height: 25px;
		width: 25px;
		margin-right: 10px;
		margin-top: 10px;
	}

	.jh_head_height {
		height: 60px;
	}

	.nav_user_photo {
		width: 30px;
		height: 30px;
		border-radius: 30px;
	}

	.nav_user_nick {
		font-size: 15px;
		color: #333333;
		font-weight: 500;
		margin-right: 10px;
		margin-left: 10px;
	}

	.nav_btn_follow {
		font-size: 12px;
		padding: 4px 8px;
		color: #FFFFFF;
		background-color: #007AFF;
		border-radius: 20px;
	}

	.page_nva_height {
		height: 65px;
		background-color: transparent;
	}

	/*******loading******/
	.refresh_loading {
		width: 35px;
		height: 35px;
	}

	/********下拉刷新**********/
	.refresh {
		justify-content: center;
	}

	.refresh-view {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		width: 750upx;
		height: 64px;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: center;
	}

	.refresh-icon {
		width: 25px;
		height: 30px;
		transition-duration: .3s;
		transition-property: transform;
		transform: rotate(0deg);
		transform-origin: 15px 15px;
	}

	.refresh-icon-active {
		transform: rotate(180deg);
	}

	.loading-icon {
		width: 28px;
		height: 28px;
		margin-right: 5px;
		color: gray;
	}

	.loading-text {
		margin-left: 2px;
		font-size: 16px;
		color: #999999;
	}

	.loading-more {
		align-items: center;
		justify-content: center;
		padding-top: 14px;
		padding-bottom: 14px;
		text-align: center;
	}

	.loading-more-text {
		font-size: 28upx;
		color: #999;
	}

	/*********swiper样式**********/
	.swiper_box {
		flex: 1;
		overflow: hidden;
	}

	.swiper-item {
		flex: 1;
	}

	/***********文章*************/
	.article_item {
		background-color: #FFFFFF;
		padding: 15px;
		padding-bottom: 10px;
		margin-bottom: 5px;
	}

	.article_head {
		flex: 1;
		flex-direction: row;
	}

	.vip_head_frame {
		width: 58px;
		height: 58px;
		margin-right: 10px;
		position: absolute;
		left: -9px;
		top: -9px;
	}

	.article_photo {
		width: 40px;
		height: 40px;
		border-radius: 40px;
		margin-right: 10px;
	}


	.article_user_info {
		flex: 1;
		flex-direction: column;
	}

	.article_user_nick_box {
		flex: 1;
		flex-direction: row;
		margin: 4px 0;
		align-items: center;
	}

	.article_user_des {
		flex: 1;
		flex-direction: row;
		align-items: center;
	}

	.article_btns {
		margin-top: 3px;
		align-items: center;
		flex-direction: row;
	}

	.article_btn_follow {
		border-radius: 20px;
	}

	.article_btn_close {
		width: 15px;
		height: 15px;
		margin-left: 10px;
		padding: 5px;
		padding-right: 0px;
		padding-left: 10px;
	}

	.article_btn_active {
		/* background-color: #007AFF; */
		color: #007AFF;
		font-size: 12px;
		font-weight: 500;
		padding: 5px 12px;
		border-width: 1px;
		border-color: #007AFF;
	}

	.btn_none {
		background-color: #e7e7e7;
	}

	.article_btn_none {
		background-color: #e7e7e7;
		color: #b3b3b3;
		font-size: 12px;
		font-weight: 500;
		padding: 6px 10px;
	}

	.article_btn_follow_img {
		width: 15px;
		height: 15px;
		margin-right: 3px;
	}

	.article_btn_follow_txt {
		font-size: 15px;
	}

	.article_user_nick {
		font-size: 15px;
		color: #333333;
	}

	.article_user_school {
		font-size: 12px;
		color: #666666;
		margin-right: 15px;
	}

	.article_lasttime {
		font-size: 12px;
		color: #999999;
	}

	.article_huati {
		color: #007AFF;
		font-size: 15px;
		padding: 5px 0;
		padding-top: 10px;
	}

	.article_content {
		font-size: 16px;
		color: #333333;
		margin: 5px 0;
	}

	.article_imgs {
		margin: 5px 0;
		flex: 1;
		flex-direction: row;
	}

	.article_category_box {
		flex-direction: row;
		align-items: center;
		margin-top: 5px;
		margin-bottom: 10px;
	}

	.article_category_left {
		background-color: #d8edff;
		padding: 5px 8px;
		border-radius: 20px;
		opacity: 0.8;
	}

	.article_category_icon {
		width: 20px;
		height: 20px;
		margin-right: 2px;
	}

	.articel_category_text {
		font-size: 12px;
		margin: 0 3px;
		font-weight: 500;
	}

	.article_category_more {
		width: 7px;
		height: 10px;
	}

	.article_one_img {
		border-radius: 5px;
		height: 180px;
	}

	.article_more_img {
		border-radius: 5px;
		margin: 0 3px;
		width: 220upx;
		height: 220upx;
	}

	.article_footer {
		flex: 1;
		flex-direction: row;
		/* border-top-width: 1px;
		border-top-color: #f9f9f9; */
		padding-top: 10px;
		padding-bottom: 5px;
		justify-content: space-between;
	}

	.article_footer_item {
		text-align: center;
		flex: 1;
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.article_footer_opt_img {
		width: 18px;
		height: 18px;
		margin-right: 5px;
		position: relative;
	}

	.article_footer_opt_txt {
		font-size: 14px;
		color: #43484D;
	}

	/************帖子投票************/
	.vote_box {
		margin: 5px 0;
	}

	.vote_item {
		margin: 5px 0;
		background-color: #EEEEEE;
		border-radius: 20px;
		padding: 0px 15px;
		height: 30px;
		line-height: 30px;
		justify-content: center;
	}

	.vote_title {
		font-size: 14px;
		color: #333333;
	}

	.vote_number {
		font-size: 13px;
		color: #666666;
	}

	.vote_bj {
		position: absolute;
		top: 0px;
		left: 0px;
		border-top-left-radius: 20px;
		border-bottom-left-radius: 20px;
		background-color: #d9d9d9;
		height: 30px;
	}

	.vote_my_active {
		background-color: #d8edff;
	}

	/********话题显示样式*******/
	.ht_item {
		border-bottom-width: 1px;
		border-bottom-color: #f7f7f7;
		flex-direction: row;
		flex: 1;
		padding: 15px 10px;
		background-color: #FFFFFF;
	}

	.ht_photo {
		width: 60px;
		height: 60px;
		border-radius: 5px;
		margin-right: 10px;
	}

	.ht_info {
		flex: 1;
	}

	.ht_select_title {
		font-size: 16px;
		color: #333333;
		margin: 5px 0;
	}

	.ht_select_des {
		font-size: 13px;
		text-overflow: ellipsis;
		margin: 5px 0;
		color: #999999;
		line-height: 20px;
	}

	.ht_more_box {
		align-items: flex-end;
		flex-direction: row;
	}

	.ht_des_more {
		width: 15px;
		height: 15px;
		margin: 5px;
	}

	/*********用户显示样式***********/
	.user_item {
		border-bottom-width: 1px;
		border-bottom-color: #f7f7f7;
		flex-direction: row;
		flex: 1;
		padding: 15px 10px;
		background-color: #FFFFFF;
	}

	.user_item_photo {
		width: 50px;
		height: 50px;
		border-radius: 60px;
		margin-right: 10px;
	}

	.user_item_info {
		flex: 1;
	}

	.user_name_box {
		flex-direction: row;
	}

	.user_item_name {
		font-size: 15px;
		color: #333333;
		margin: 3px 0;
	}

	.user_item_des {
		font-size: 13px;
		text-overflow: ellipsis;
		margin: 3px 0;
		color: #999999;
		line-height: 20px;
	}

	.user_item_right {
		align-items: flex-end;
		flex-direction: row;
	}

	.user_item_right_follow {
		width: 15px;
		height: 15px;
		margin: 5px;
	}

	/********顶部是搜索**********/
	.jh_nav_box_sousou {
		margin-top: 20px;
		flex-direction: row;
	}

	.jh_nav_center_sousou {
		margin: 10px 13px;
		flex-direction: row;
		flex: 1;
	}

	.sousou_box {
		flex: 1;
		flex-direction: row;
		border-radius: 20px;
		padding: 2px 15px;
		background-color: #eaeaea;
		align-items: center;
	}

	.sousou_img {
		width: 18px;
		height: 18px;
		margin-right: 5px;
	}

	.sousou_input {
		font-size: 14px;
		flex: 1;
		flex-direction: row;
	}

	.jh_nav_right {
		flex-direction: row;
		align-items: center;
		margin-left: 13px;
		margin-top: 3px;
	}

	.btn_cancel {
		font-size: 16px;
		color: #666;
	}

	/********空提示**********/
	.empty_tip {
		flex: 1;
		flex-direction: column;
		justify-content: center;
		text-align: center;
		margin: 20px 0;
	}

	.empty_icon {
		flex: 1;
		flex-direction: row;
		margin-bottom: 10px;
		justify-content: center;
	}

	.empty_img {
		width: 100px;
		height: 100px;
	}

	.empty_title {
		font-size: 15px;
		color: #333333;
		padding: 5px 0;
		text-align: center;
	}

	.empty_des {
		font-size: 13px;
		color: #8c8c8c;
		padding: 5px 0;
		text-align: center;
	}


	// 下边距
	.margin-b5 {
		margin-bottom: 5rpx;
	}

	.margin-b10 {
		margin-bottom: 10rpx;
	}

	.margin-b15 {
		margin-bottom: 15rpx;
	}

	.margin-b20 {
		margin-bottom: 20rpx;
	}

	.margin-b25 {
		margin-bottom: 25rpx;
	}

	.margin-b30 {
		margin-bottom: 30rpx;
	}

	.margin-b40 {
		margin-bottom: 40rpx;
	}

	.margin-b60 {
		margin-bottom: 60rpx;
	}

	.margin-b80 {
		margin-bottom: 80rpx;
	}

	.margin-b100 {
		margin-bottom: 100rpx;
	}

	// 右边距
	.margin-r5 {
		margin-right: 5rpx;
	}

	.margin-r10 {
		margin-right: 10rpx;
	}

	.margin-r15 {
		margin-right: 15rpx;
	}

	.margin-r20 {
		margin-right: 20rpx;
	}

	.margin-r25 {
		margin-right: 25rpx;
	}

	.margin-r30 {
		margin-right: 30rpx;
	}

	.margin-r40 {
		margin-right: 40rpx;
	}

	.margin-r60 {
		margin-right: 60rpx;
	}

	// 字体大小
	.font-18 {
		font-style: normal;
		font-size: 18rpx;
		font-family: Droid Sans Fallback;
	}

	.font-20 {
		font-style: normal;
		font-size: 20rpx;
		font-family: Droid Sans Fallback;
	}

	.font-22 {
		font-style: normal;
		font-size: 22rpx;
		font-family: Droid Sans Fallback;
	}

	.font-24 {
		font-style: normal;
		font-size: 24rpx;
		font-family: Droid Sans Fallback;
	}

	.font-26 {
		font-style: normal;
		font-size: 26rpx;
		font-family: Droid Sans Fallback;
	}

	.font-28 {
		font-style: normal;
		font-size: 28rpx;
		font-family: Droid Sans Fallback;
	}

	.font-30 {
		font-style: normal;
		font-size: 30rpx;
		font-family: Droid Sans Fallback;
	}

	.font-32 {
		font-style: normal;
		font-size: 32rpx;
		font-family: Droid Sans Fallback;
	}

	.font-34 {
		font-style: normal;
		font-size: 34rpx;
		font-family: Droid Sans Fallback;
	}

	.font-36 {
		font-style: normal;
		font-size: 36rpx;
		font-family: Droid Sans Fallback;
	}

	.font-38 {
		font-style: normal;
		font-size: 38rpx;
		font-family: Droid Sans Fallback;
	}

	.font-40 {
		font-style: normal;
		font-size: 40rpx;
		font-family: Droid Sans Fallback;
	}

	.font-46 {
		font-style: normal;
		font-size: 46rpx;
		font-family: Droid Sans Fallback;
	}

	.font-50 {
		font-style: normal;
		font-size: 50rpx;
		font-family: Droid Sans Fallback;
	}

	.font-60 {
		font-style: normal;
		font-size: 60rpx;
		font-family: Droid Sans Fallback;
	}

	.font-80 {
		font-style: normal;
		font-size: 80rpx;
		font-family: Droid Sans Fallback;
	}

	// 字体对齐
	.text-left {
		text-align: left;
	}

	.text-center {
		text-align: center;
	}

	.text-right {
		text-align: right;
	}

	// color相关
	.color-white {
		color: #FFFFFF;
	}

	.color-red {
		color: #dc0000;
	}

	// 黑色色阶向下
	.color-black {
		color: #000;
	}

	.color-black-3 {
		color: #333;
	}

	.color-black-6 {
		color: #666;
	}

	.color-black-9 {
		color: #999;
	}

	// 字体宽度
	.font-weight-400 {
		font-weight: 400;
	}

	.font-weight-500 {
		font-weight: bold;
	}

	// 间隔
	.spacing-20 {
		width: 750rpx;
		height: 20rpx;
		background-color: #f8f8f8;
	}

	// 圆角
	.radius-10 {
		border-radius: 10rpx;
	}

	.radius-20 {
		border-radius: 20rpx;
	}

	.radius-30 {
		border-radius: 30rpx;
	}

	.radius-circle {
		border-radius: 50%;
	}

	.radius-height {
		border-radius: 10000px;
	}

	// flex相关
	.vs-flex-item {
		flex: 1;
	}

	.vs-space-between {
		justify-content: space-between;
	}

	.vs-space-around {
		justify-content: space-around;
	}

	.vs-space-center {
		justify-content: center;
	}

	.vs-space-end {
		justify-content: flex-end;
	}

	.vs-row {
		flex-direction: row;
	}

	.vs-column {
		flex-direction: column;
	}

	.vs-align-end {
		align-items: flex-end;
	}

	.vs-align-center {
		align-items: center;
	}

	.vs-align-start {
		align-items: flex-start;
	}

	.vs-item-hover {
		background-color: rgba(0, 0, 0, 0.05);
	}

	.vs-btn-hover {
		opacity: 0.8;
	}

	.color-base {
		color: #5064eb;
	}

	.bg-color-base {
		background-color: #5064eb;
	}
</style>
